<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html style="height: 100%">
   <head>
       <meta charset="utf-8">
   </head>
   <%
  Integer unsubmit = (Integer)request.getAttribute("unsbmit");
 %>
   <%
  Integer submit = (Integer)request.getAttribute("submit");
 %>
   <%
  Integer pass = (Integer)request.getAttribute("pass");
 %>
   <%
  Integer unpass = (Integer)request.getAttribute("unpass");
 %>
   <body style="height: 100%; margin: 0;width:100%">
       <div id="container" style="height: 100%"></div>
       <script type="text/javascript" src="${pluginPath}/echart/echarts.min.js"></script>
       <script type="text/javascript" src="${pluginPath}/echart/echarts-gl.min.js"></script>
       <script type="text/javascript" src="${pluginPath}/echart/ecStat.min.js"></script>
       <script type="text/javascript" src="${pluginPath}/echart/dataTool.min.js"></script>
       <script type="text/javascript" src="${pluginPath}/echart/china.js"></script>
       <script type="text/javascript" src="${pluginPath}/echart/world.js"></script>
       <script type="text/javascript" src="${pluginPath}/echart/bmap.min.js"></script>
       <script type="text/javascript" src="${pluginPath}/echart/simplex.js"></script>
       <script type="text/javascript">
var dom = document.getElementById("container");
var myChart = echarts.init(dom);
var app = {};
option = null;
option = {
    title : {
        text: '请假单结果分析',
        x:'center'
    },
    tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
    },
    legend: {
        orient: 'vertical',
        left: 'left',
        data: ['未提交','已提交','已批准','已拒绝']
    },
    series : [
        {
            name: '访问来源',
            type: 'pie',
            radius : '55%',
            center: ['50%', '60%'],
            data:[
                {value:<%=unsubmit%>, name:'未提交'},
                {value:<%=submit%>, name:'已提交'},
                {value:<%=pass%>, name:'已批准'},
                {value:<%=unpass%>, name:'已拒绝'}
            ],
            itemStyle: {
                emphasis: {
                    shadowBlur: 10,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
            }
        }
    ]
};
;
if (option && typeof option === "object") {
    myChart.setOption(option, true);
}
       </script>
   </body>
</html>